<?php

/**
 * NeoPersonaEvento filter form.
 *
 * @package    neoTrainner
 * @subpackage filter
 * @author     Your name here
 */
class NeoPersonaEventoFormFilter extends BaseNeoPersonaEventoFormFilter {

    public function configure() {
        unset(
                $this['created_at'], $this['updated_at'], $this['acepta_terminos'],
                $this['neo_persona_id'],$this['neo_distancia_evento_id'],$this['neo_categoria_evento_id'],$this['apellido']
        );
        
                        
        $this->widgetSchema['estado'] = new sfWidgetFormChoice(array(
                    'choices' => NeoPersonaEventoPeer::$estados,
                    'expanded' => false,
                ));
        
        $this->validatorSchema['estado'] = new sfValidatorChoice(
                array(
                    'choices' => array_keys(NeoPersonaEventoPeer::$estados),
                )
        );
        
    }
    
    /**
     * Devuelve el criteria para obtener novedades por estado.
     */
    protected function addEstadoColumnCriteria($query, $field, $value) {
        $query->addAnd(NeoPersonaEventoPeer::getEstadoCriterion($value));
        return $query;
    }
    

}
